/**
 ******************************************************************************
 * @FilePath: \for_infantry\Thread\GimbalTask.c
 * @Brief: 
 * @Date: 2021-01-12 23:27:53
 * @Author: Rio
 ******************************************************************************
 */
#include "GimbalTask.h"
#include "Gimbal.h"
#include "nuc_interface.h"
#include "Mode_SW.h"
#include "bsp_can.h"
extern uint8_t RobotId;
static uint8_t pcTick = 0;

void StartGimbalTask(void const * argument)
{
  /* USER CODE BEGIN StartGimbalTask */
  /* Infinite loop */
  for(;;)
  {
		pcTick++;
		if(!(pcTick % 200))
		{	
			switch (RobotId)
			{
			case 1:
				sendMessageToPc(0,0);
				break;
			case 101:
				sendMessageToPc(1,0);
				break;
			default:
				break;
			}
		}	
    ModeSwitch();
		Gimbal_Ctrl();
    osDelay(6);
  }
  /* USER CODE END StartGimbalTask */
}

